package com.my.api.response;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

public class Msg {
	private boolean suc;
	private int code;
	private String msg;
	private Object data;
	public Msg(boolean suc,String msg) {
		this.suc = suc;
		this.msg = msg;
	}
	public Msg(boolean suc,int code,String msg) {
		this.suc = suc;
		this.code = code;
		this.msg = msg;
	}
	public Msg(boolean suc,int code,String msg,Object data) {
		this.suc = suc;
		this.code = code;
		this.msg = msg;
		this.data = data;
	}
	
	public Msg(boolean suc,String msg,Object data) {
		this.suc = suc;
		this.msg = msg;
		this.data = data;
	}
	
	public boolean isSuc() {
		return this.suc;
	}
	
	public String getMsg() {
		return this.msg;
	}
	
	public Object getData() {
		return this.data;
	}
	
	public int getCode() {
		return this.code;
	}
	
	@Override
	public String toString() {
		return JSON.toJSONString(this, SerializerFeature.UseISO8601DateFormat);
	}
}
